using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class SpriteSwitch : MonoBehaviour
{
    [SerializeField]
    private Sprite _default;

    [SerializeField]
    private Sprite _active;

    private SpriteRenderer _renderer;


    private void Awake()
    {
        _renderer = GetComponent<SpriteRenderer>();
    }

    public void UpdateSprite(bool active)
    {
        if (active)
        {
            _renderer.sprite = _active;
        }
        else
        {
            _renderer.sprite = _default;
        }
    }
}
